﻿CREATE TABLE [dbo].[t_PurchaseBatch] (
    [ID]               INT              IDENTITY (1, 1) NOT NULL,
    [DateCreated]      SMALLDATETIME    NOT NULL,
    [Name]             VARCHAR (64)     NULL,
    [Description]      NVARCHAR (4000)  NULL,
    [ContractHolderID] INT              NOT NULL,
    [CompanyID]        INT              NOT NULL,
    [Criteria]         VARCHAR (512)    NULL,
    [NameSpace]        NVARCHAR (4000)  NOT NULL,
    [NameSpaceID]      INT              NOT NULL,
    [StatusID]         INT              NOT NULL,
    [StatusDate]       DATETIME         NOT NULL,
    [StatusUser]       VARCHAR (32)     NOT NULL,
    [BatchNumber]      SMALLINT         NULL,
    [BatchImages]      VARBINARY (MAX)  NULL,
    [LoansCount]       SMALLINT         NULL,
    [Recourse]         TINYINT          NULL,
    [Discount]         NUMERIC (4, 2)   NULL,
    [GUID_Documents]   UNIQUEIDENTIFIER NOT NULL
);

